<html>
<head><meta charset="utf-8"><title>Source formatting · clippy · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/index.html">clippy</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/Source.20formatting.html">Source formatting</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="224042577"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/Source%20formatting/near/224042577" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dániel Buga <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/Source.20formatting.html#224042577">(Jan 26 2021 at 14:04)</a>:</h4>
<p>While working on <a href="https://github.com/rust-lang/rust/issues/81405">#81405</a> I found that the clippy source is formatted different to rustc itself. My editor is configured to format on save so that CI doesn't reject my changes immediately (which is annoying), but this means that changing anything in clippy results in diffs like this: <a href="https://github.com/rust-lang/rust/pull/81405/files#diff-c71578f55dd58021b2557dd7d6e27dbb4c01d41a6390e0bf7e1cdbcf942dfcb4">https://github.com/rust-lang/rust/pull/81405/files#diff-c71578f55dd58021b2557dd7d6e27dbb4c01d41a6390e0bf7e1cdbcf942dfcb4</a></p>
<p>I'm not quite sure a "reformat the world" commit would be helpful, as it would hide some of the blame on the files, but trying to cherry-pick my changes from a reformatted mess is a bother. Does anyone have suggestions on what I could/should do here?</p>



<a name="224043581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/Source%20formatting/near/224043581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> flip1995 <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/Source.20formatting.html#224043581">(Jan 26 2021 at 14:11)</a>:</h4>
<p>rustc and Clippy don't use the same <code>rustfmt.toml</code>. But we want to do this eventually. If you want to put time into reformatting Clippy according to <code>rustc</code> format configuration, That's definitely welcome.</p>
<p>I guess your editor formats clippy according to clippys rustfmt.toml, but since other people who change Clippy in the rust repo don't format it, you get the big diff.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>